import { requestGet, requestPost, requestPut } from '../utils/requestApi'

export async function getProductList(payload) {
  return requestGet('product', payload)
}
// export async function getSearchProduct(paylaod) {
//     return requestGet('product', payload)
// }
export async function getProductDetail(payload) {
  return requestGet(`product/${payload.id}`, payload)
}
export async function getExProducts(payload) {
  return requestGet(`product`, payload)
}
export async function getExhibitorList(payload) {
  return requestGet('exhibitor', payload)
}
export async function getExhibitorDetail(payload) {
  return requestGet(`exhibitor/${payload.id}`, payload)
}
export async function getNews(payload) {
  return requestGet(`news`, payload)
}

export async function getNewsDetail(payload) {
  return requestGet(`news/${payload.id}`, payload)
}

export async function getVideoList(payload) {
  return requestGet(`video`,payload)
}
export async function postSmsCode(paylaod) {
  return requestPost(`sendSmsCode`, paylaod)
}
export async function postLogin(paylaod) {
  return requestPost(`login`, paylaod)
}

export async function getUserSelf(payload) {
  return requestGet('getUserSelf')
}
export async function postLikeProduct(payload) {
  return requestPost('likeProduct', payload)
}
export async function postLikeExhibitor(payload) {
  return requestPost('likeExhibitor', payload)
}
export async function postLikeNews(payload) {
  return requestPost('likeNews', payload)
}

export async function postWantbuy(payload) {
  return requestPost('wantbuy', payload)
}

export async function getLikeProductList(payload) {
  return requestGet('likeProductList', payload)
}
export async function getLikeNewsList(payload) {
  return requestGet('likeNewsList', payload)
}
export async function getLikeExhibitorList(payload) {
  return requestGet('likeExhibitorList', payload)
}
export async function postReceipt(payload) {
  return requestPost('receipt', payload)
}

export async function getWantbuyList(payload) {
  return requestGet('wantbuyList', payload)
}
export async function getWantbuyDetail(payload) {
  return requestGet(`getWantbuy`, payload)
}
export async function getExhibitor2021(payload) {
  return requestGet('exhibitor2021', payload)
}
